package com.potenzacd.project.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author: Apollo.
 * @Date: 2021/1/25
 * @Description:  架构信息
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ArchitectureInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键自增
     */
    @Id
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(columnDefinition = "int(11) comment'主键自增'")
    private Integer id;

    /**
     * 业务标识
     */
    @Column(columnDefinition = "varchar(40) comment'业务标识'")
    private String code;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(columnDefinition = "timestamp comment'创建时间'")
    private Date createTime;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(columnDefinition = "timestamp comment'修改时间'")
    private Date updateTime;

    /**
     * 是否删除
     * 1:删除  2:未删除
     */
    @Column(columnDefinition = "smallint(2) comment'是否删除: 1:删除 2:未删除'")
    private Integer delete;

    /**
     * 架构描述
     */
    @Column(columnDefinition = "varchar(40) comment'架构描述'")
    private String des;

    /**
     * 架构的名称
     */
    @Column(columnDefinition = "varchar(40) comment'架构的名称'")
    private String name;

    /**
     * 项目信息的标识
     */
    private String projectInfoCode;

    /**
     * 架构附件信息
     */
    @TableField(exist = false)
    private List<ArchitectureAttachInfo> architectureAttachInfos;

    /**
     * 架构类型信息
     */
    @TableField(exist = false)
    private List<ArchitectureTypeInfo> architectureTypeInfos;

}
